home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10951 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  35 lines

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Example of an unintelligible program in C
  5. Date: 20 Mar 1996 16:00:43 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4iq67bINN3gs@keats.ugrad.cs.ubc.ca>
  8. References: <4iegj7$evn@bee.uspnet.usp.br> <4if0i4$qsm@garden.csc.calpoly.edu> <4ij8je$lb9@charm.il.ft.hse.nl>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4ij8je$lb9@charm.il.ft.hse.nl>, robert <robert@il.ft.hse.nl> wrote:
  12.  >dstubbs@garden.csc.calpoly.edu (Dan Stubbs):
  13.  > >Here is one of my favorites. Guess what it does! Apply a formatter
  14.  > >such as cb or indent to it if you really want to make it obscure.
  15.  >
  16.  >Here's another one:
  17.  >main(w){float x=25,q=80,a=-2,c=-1.2,e=(1-a)/q,f=(-c-c)/x,y,g,h=c,r,i,u=x,v;for(;
  18.  >u--;h+=f)for(v=q,g=a;v--;g+=e,putchar(w[".,:;=+itIYVXRBM "]))for(w=r=i=0;x=r,y=i
  19.  >,r=x*x-y*y+g,i=2*x*y+h,w<15&&r*r+i*i<4;w++);}
  20.  
  21. Too bad most of these programs are non-conforming.
  22.  
  23. The square root example given in the earlier posting employs a variable whose
  24. name is the underscore character. Oops.
  25.  
  26. In the above, main() is incorrectly declared---the standard requires that it
  27. have two arguments or none at all, the second being, of course, a pointer to
  28. pointer to char.
  29.  
  30. What about the use of putchar without having included <stdio.h>, hmm?
  31.  
  32. The exit status is undefined, also.
  33. -- 
  34.  
  35.